function btn_modify_submit(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/disabled?id=" + id;
}

function btn_detail_submit(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/detail?id=" + id;
}

function btn_enable_submit(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/enable?id=" + id;
}

function btn_disabled_submit(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/disabled?id=" + id;
}

function btn_remove_submit(element) {
    if (confirm("您是否确认删除该条记录？")) {
        var id = $(element).attr("id");
        var model_path = $("#form1").attr("model_path");
        location.href = model_path + "/remove?id=" + id;
    }
}

function ajax_remove_submit(element) {

    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    if (confirm("您是否确认删除该条记录？")) {
        $.ajax({
            type: "get",
            url: model_path + "/isUseById",
            data: {id: id},
            success: function (isUse) {
                if (isUse) {
                    alert("该记录与其他信息存在关联，不能删除！");
                } else {

                    location.href = model_path + "/remove?id=" + id;
                }
            }
        });
    }
}
function btn_removes_submit() {
    if (confirm("您是否确认批量删除记录？")) {
        var action=$("#form1").attr("model_path")+"/removes";
        $("#form1").prop("action",action).submit();
    }
}

function btn_modify_up(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/modifyUp?id=" + id;
}

function btn_modify_down(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/modifyDown?id=" + id;
}

function btn_modifyImages_submit(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/modifyImages?id=" + id;
}

function btn_modifyGoodsSpecs_submit(element) {
    var id = $(element).attr("id");
    var model_path = $("#form1").attr("model_path");
    location.href = model_path + "/modifyGoodsSpecs?id=" + id;
}